1. Field of the Invention
The present invention relates to a decoder suitable for decoding MPEG data (i.e., data decoded on the basis of the MPEG standards) and a reproducing unit comprising the decoder, and more particularly, it relates to an improvement for implementing slow decoding performed when coded data is input at a slow speed slower than a normal speed (i.e., an original speed expressed by time control information recorded in the coded data) with a simple hardware structure.
2. Description of the Background Art
FIG. 13 is a block diagram showing the structure of a conventional MPEG data reproducing unit 150. This reproducing unit 150, disclosed in Japanese Patent Application Laid-Open No. 11-146339 (1999), for example, is so structured as to perform slow decoding on MPEG data input through a magnetic tape thereby enabling slow reproduction (reproduction at a slow speed) of images. The reproducing unit 150 is built into a digital video recorder, for example.
In the reproducing unit 150, a tape 1 is a magnetic storage medium for recording and reproducing MPEG data, and a motor drive 2 is an element controlling the traveling speed of the tape 1. A reproducing head 3 reads a signal recorded in the tape 1, and a reproducing amplifier 4 amplifies the signal read by the reproducing head 3. A reproduced signal processing part 5 demodulates the signal amplified by the reproducing amplifier 4 and decodes the same as reproduced data. An error correction part 6 performs error correction of the reproduced data decoded by the reproduced signal processing part 5. A buffer memory 7 temporarily holds the reproduced data during error correction. A general reproducing buffer 20 temporarily holds the reproduced data having been subjected to error correction when performing normal reproduction (i.e., reproduction at a normal speed). An MPEG data switch 21 selects buffer output between normal reproduction and slow reproduction.
A frame frequency determination part 22 determines a frame frequency in slow reproduction. A slow reproducing buffer 23 temporarily holds the MPEG data in slow reproduction. A difference 0 B picture generation part 24 generates a B picture having a difference 0. A B picture insertion switch 25 inserts the B picture having the difference 0 in slow-reproduced data. A slow reproduction control part 26 determines the reproducing speed and controls insertion of the B picture having the difference 0 on the basis of the result of the determination of the picture type of the slow-reproduced data. A picture type determination part 27 determines the picture type of the slow-reproduced data. A data rearrange part 28 changes a time stamp, a GOP number and display order data in the MPEG data in which the B picture having the difference 0 is inserted. An MPEG system layer decoder 29 performs decoding on a system layer (MPEG-TS). A VCXO 30 generates a 27 MHz clock forming a reference for decoding the MPEG data on the basis of a control signal from the MPEG system layer decoder 29. An MPEG video decoder 31 decodes the MPEG data.
Operations of the reproducing unit 150 are now described. The signal recorded in the tape 1 is read by the reproducing head 3, amplified by the reproducing amplifier 4, subjected to signal processing such as demodulation, synchronizing signal detection and data separation in the reproduced signal processing part 5 and thereafter input in the error correction part 6. The error correction part 6 temporarily stores the input reproduced data in the buffer memory 7. The error correction part 6 performs error correction when all data of one unit to which error correction codes are added in recording are available. Thus, errors following reproduction can be substantially completely corrected.
In normal reproduction, data subjected to error correction output from the error correction part 6 is transmitted to the MPEG decoder 31 through the general reproducing buffer 20 and the switch 21. In slow reproduction, on the other hand, all signals for one track recorded in the tape 1 are reproduced by performing head scanning a plurality of times. In the case of DVCR standardized by Digital VCR Kyogikai (Japan), for example, error correction codes are added on a single track as a unit. Therefore, the error correction part 6 stores reproduced data for one track in the buffer memory 7 and performs error correction on the stored reproduced data for one track.
FIGS. 14A to 14E are timing charts for illustrating the operations of the reproducing unit 150 shown in FIG. 13 with the structure of image data decoded by the reproducing unit 150. Before describing operations in slow reproduction, image data to be displayed in slow reproduction and image data input in a decoder are described with reference to FIGS. 14A to 14E. A data string of FIG. 14A shows the structure of general MPEG image data. The MPEG image data is formed in display order of pictures I0, B0, B1, P0, B2, B3, P1, B4, . . . .
The picture I0 is an intra-frame coded image capable of restructuring a single frame. The picture P0 and the picture P1 are inter-frame predictive-coded images predicted from the picture I0 and the picture P0 respectively, while the pictures B0 and B1 and the pictures B2 and B3 are inter-frame predictive-coded images predicted from the pictures I0 and P0 and from the pictures P0 and P1 respectively.
When slow reproduction is performed at one third speed on the basis of the data string of FIG. 14A, only scattered data of the pictures I0, B0, B1 and P0 are present at three-frame intervals in display order as shown in a data string of FIG. 14B. When displaying the data, each frame must be repeatedly output three times as shown in a data string of FIG. 14C. However, an MPEG decoder built into a general digital broadcasting receiver or the like requires a specific device in order to receive non-standard MPEG data such as the data string of FIG. 14B having scattered frames and repeatedly display each image as shown in the data string of FIG. 14C.
When forming standard MPEG data to display a frame string such as the data string of FIG. 14C and inputting the same in the MPEG decoder, the MPEG decoder can display an excellent slow reproduced image also when the same has no specific device. Standard MPEG data displaying the frame string such as the data string of FIG. 14C is a data string of FIG. 14D. Also in the data string of FIG. 14D, the pictures are illustrated in display order similarly to the data strings of FIGS. 14A to 14C.
In the data string FIG. 14D, data of the reproduced picture I0 is first output as such without changing the contents of the data. Then, a forward-predictive B picture Ba having a difference 0 is output twice (for two frames) in order to repeatedly display the picture I0. The picture Ba, which is the forward-predictive B picture, is an inter-frame predictive-coded image predicted from a precedently displayed I or P picture. In the data string of FIG. 14D, the picture Ba is an inter-frame predictive-coded image predicted from the picture I0, and an ordinary MPEG decoder having no specific device outputs an image having a difference 0 forward-predicted from the picture I0, i.e., the same image as the frame I0 when the picture Ba is input.
In order to repeatedly display the picture I0 three times, the data of the picture I0 may be repeatedly output three times as such as in the data string of FIG. 14C. In general, however, the data quantity of an I picture is larger than those of other types of pictures, and hence a buffer may overflow on the side of the decoder when continuing the same. Therefore, the picture Ba which is the forward-predictive B picture having the difference 0 is output in the data string of FIG. 14D.
Then, the picture B0 is output as such, in order to repeatedly display the picture B0 three times with the original data contents. The picture B0 is an inter-frame predictive-coded image predicted from the precedently displayed picture I0 and the subsequently displayed picture P0. The picture I0 and the picture P0 are output as such, and hence the picture B0 is also output as such without changing its data contents. Then, the picture B0 is continuously output twice, in order to repeatedly display the picture B0 twice. For the same reason, the subsequent picture B1 is repeatedly output three times as such, in order to repeatedly display the picture B1 three times.
While the picture P0 must thereafter be repeatedly displayed three times, the data of the picture P0 may not be repeatedly output three times as such. The reason for this is as follows:
The picture P0, which is an inter-frame predictive-coded image predicted from a precedently displayed I or P picture, is an inter-frame predictive-coded image predicted from the picture I0 in this case. Assuming that dP0 represents the difference between the picture P0 and the picture I0, the picture P0 is expressed as P0=I0+dP0.
Assuming that data of the picture P0 is repeatedly output three times, the decoder receiving the second picture P0 interprets the second data P0 as difference data from a precedently displayed P picture, i.e., the picture P0, and displays not an image of the precedent picture P0 (=I0+dP0) but an image of {(I0+dP0)+dP0}.
Therefore, the picture P0 is first output as such similarly to the case of the picture I0, and thereafter a picture Bb (having the same data contents as the picture Ba), i.e., a forward-predictive B picture having a difference 0 is continuously output twice, in order to continuously display an image having a difference 0 with reference to this picture P0, i.e., the same image as the picture P0 twice.
When performing one-third-speed slow reproduction on the original image expressed in the data string of FIG. 14A, as hereinabove described, it is possible to supply image data displayed as the data string of FIG. 14C having a frame frequency equal to a display frame frequency with a standard decoder by generating image data such as the data string of FIG. 14D in display order and outputting the same. The frame string of the data string of FIG. 14D is rewritten in data output order, as shown in a data string of FIG. 14E. The pictures B0 and B1 of bi-directional prediction cannot be decoded unless data of I and P pictures subsequently located in display order are available, and hence the I and P pictures necessary for decoding the B pictures are output in advance of the picture B0 and the picture BI in the data string of FIG. 14E.
A procedure of generating the image data such as the data string of FIG. 14D is described with reference to FIG. 13 again. The error correction part 6 collects image data reproduced by slow reproduction for a single track and thereafter outputs the same. The reproducing unit 150 shown in FIG. 13 transmits data at a speed slower than an original transmission speed due to slow reproduction, and hence the data is temporarily stored in the buffer 23 for slow reproduction and input in the frame frequency determination part 22 in slow reproduction. The frame frequency determination part 22 determines a frame frequency for display from image format information included in MPEG data and inputs the result of the determination in the slow reproduction control part 26.
The slow reproduction control part 26 switches the switch 25 toward the slow reproducing buffer 23 for performing read control of the slow reproducing buffer 23 and reads data for a single picture from the slow reproducing buffer 23. When the data for a single picture is read, the picture type determination part 27 determines whether the picture data read from the slow reproducing buffer 23 is an I, P or B picture, and transmits the result of this determination to the slow reproduction control part 26. The slow reproduction control part 26 controls the switch 25 in response to the result of the determination received from the picture type determination part 27.
If the read data for a single picture is an I picture or a P picture, the slow reproduction control part 26 switches the switch 25 toward the difference 0 B picture generation part 24 for outputting a forward-predictive B picture having a difference 0. If the read data is a B picture, the slow reproduction control part 26 keeps the switch 26 on the side of the slow reproducing buffer 23 and rereads the B picture.
The slow reproduction control part 26 decides the number of times for outputting these pseudo-images. When an instruction for starting slow reproduction is input in the slow reproduction control part 26 in the aforementioned example of the one-third-speed slow generation, the slow reproduction control part 26 rotates the motor 2 for driving the tape 1 at the one third speed and inserts data of two frames with respect to one frame of read data as described above.
Thus, the switch 25 outputs an image data string such as the data string shown in FIG. 14E. Each data output from the switch 25 is transmitted to the MPEG decoders 29 and 31 through the data rearrange part 28 and the switch 21.
The data rearrange part 28 is an element changing the time stamp, the GOP number and the display order. When the time stamp (relative time for decoding and displaying image data) assigned to the original image data is one-third-speed slow reproduction, the data rearrange part 28 changes the original time to a time extended to three times and rewrites a picture number in each GOP (group of pictures) to three times. The data rearrange part 28 also rewrites display order of respective pictures in each GOP to order including the inserted pseudo-pictures Ba and Bb.
The data thus output through the switch 21 is input in the MPEG system layer decoder 29 as MPEG data having a time stamp suitable to the data transmission speed for slow reproduction. The MPEG system layer decoder 29 extracts the time stamp etc. from the input MPEG data and controls the VCXO 30 generating the system clock while taking out the image data and inputting the same in the MPEG video decoder 31. The MPEG video decoder 31 decodes the input MPEG image data and outputs projectable image data.
In the conventional MPEG data reproducing unit, however, the circuit structure for implementing slow reproduction is disadvantageously complicated as shown in FIG. 13. Further, control of each element of the device is complicated. In addition, the B picture having a difference 0 for slow reproduction is inserted in a single picture unit, and hence the MPEG data reproducing unit can basically cope with only an integer-fractional speed.